<?php $this->load->view('index/header.html'); ?>

		<!-- Main -->
			<div id="main">
				
					<section>
						<select name="cate" id="cate">
							<option value="0">----选择分类，默认所有----</option>
							<?php foreach($cate as $itca):?>
							<option value="<?=$itca->id?>" <?php echo isset($thiscate->id) && $thiscate->id==$itca->id?"selected":"";?> ><?=$itca->name?></option>
							<?php endforeach;?>
						</select>
					
					</section>

					<section class="ilist">
						
						<ol><?php foreach($article as $item):?>
							<li><span>[ <?php foreach($cate as $i):?><?php if($i->id==$item->cate){echo $i->name;} ?><?php endforeach; ?> ]</span><a href="<?php echo site_url('home/article/'); ?><?=$item->id?>"><?=$item->title?></a><i><?=$item->time?></i></li>
						<?php endforeach;?></ol>
					</section>
					
<style type="text/css">
<!--
.ilist ol li { line-height:3em;}
.ilist ol li span { display:inline-block; width:100px;}
.ilist ol li a { margin-left:0.8em;}
.ilist ol li i { margin-left:2em}
-->
</style>				

			</div>
			
<?php $this->load->view('index/footer.html'); ?>

<script type="text/javascript">
<!--

	$("select[name='cate']").change(function(){
		location.href="<?php echo site_url('home/catepage/');?>"+$(this).val();
	});
//-->
</script>